Repository Public
1/**2 * =============================================================================3 * SP BOUCHER | SOFTWARE & RESEARCH4 * ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5 * =============================================================================6 *7 * Project : ORIX App Universe8 * File : src/app/[locale]/page.tsx9 * Module : app10 * Repository : https://git.spboucher.ai/orix-spboucher-ai11 * Project Website : https://www.orixlab.dev12 * Created : 2026-11-2113 * Last Modified : 2026-11-2114 *15 * Author : Simon-Pierre Boucher16 * Position : Professor of Finance17 * Institution : Université du Québec en Outaouais (UQO)18 * Organization : SP Boucher19 * Website : https://spboucher.ai20 * Git : https://git.spboucher.ai21 *22 * Preferred Contact: support@spboucher.ai23 * Development : dev@spboucher.ai24 * Support : support@spboucher.ai25 * Security/Admin : admin@spboucher.ai26 *27 * Copyright (c) 202628 * Simon-Pierre Boucher29 * All rights reserved where applicable. This file is governed by the30 * applicable project license, copyright notices and relevant law.31 * Existing third-party rights and notices remain unaffected.32 *33 * License : None specified (no license file in this repository)34 *35 * Do not embed credentials, private keys, access tokens,36 * certificates or confidential personal information.37 *38 * =============================================================================39 * END OF SP BOUCHER SOURCE HEADER40 * =============================================================================41 */4243import Link from "next/link";44import type { Metadata } from "next";45import { Hero } from "@/components/hero/Hero";46import { Universe } from "@/components/universe/Universe";47import { AppCard } from "@/components/apps/AppCard";48import { PrimaryAction } from "@/components/apps/PrimaryAction";49import { Reveal } from "@/components/ui/Reveal";50import { Words } from "@/components/ui/Words";51import { CountUp } from "@/components/ui/CountUp";52import { Arrow, Down, PlatformBadges, StatusBadge } from "@/components/ui/Badges";53import { NewsList } from "@/components/apps/NewsList";54import { Showcase } from "@/components/showcase/Showcase";55import { IconMarquee } from "@/components/lineup/IconMarquee";56import { Starfield } from "@/components/hero/Starfield";57import { macDownloads } from "@/lib/downloads/list";58import { dict, href, isLocale, type Locale } from "@/lib/i18n";59import { cards, lineup, showcase } from "@/lib/view";60import { feed } from "@/lib/news";61import { alternates, organizationLd } from "@/lib/seo";62import type { CardApp } from "@/models/filter";6364export async function generateMetadata({ params }: { params: Promise<{ locale: string }> }): Promise<Metadata> {65 const { locale } = await params;66 return { alternates: alternates("/", locale as Locale) };67}6869/** One device family of the line-up: a giant outlined word drifting behind the heading, then a card per application. */70function Family({ id, tone, eyebrow, ghost, title, body, apps, locale, more }: { id: string; tone: string; eyebrow: string; ghost: string; title: string; body: string; apps: CardApp[]; locale: Locale; more: { href: string; label: string } }) {71 return (72 <section id={id} className="lineup section" aria-labelledby={`${id}-title`} data-testid={`lineup-${id}`}>73 <span className="ghost" aria-hidden>{ghost}</span>74 <span className="lineup-glow" aria-hidden style={{ "--tone": tone, [id === "mac" ? "left" : "right"]: "-28vmax", top: "8%" } as React.CSSProperties} />75 <div className="wrap wrap-wide">76 <Reveal className="flex flex-wrap items-end justify-between gap-6">77 <div>78 <p className="eyebrow">{eyebrow}</p>79 <h2 id={`${id}-title`} className="h1 mt-5 max-w-4xl"><Words text={title} /></h2>80 <p className="lead mt-5">{body}</p>81 </div>82 <Link href={more.href} className="link text-[0.95rem] font-semibold">{more.label}</Link>83 </Reveal>84 <ul className="mt-12 grid gap-5 md:grid-cols-2 xl:grid-cols-3">85 {apps.map((a, i) => <Reveal as="li" key={a.slug} delay={(i % 3) * 110}><AppCard app={a} locale={locale} /></Reveal>)}86 </ul>87 </div>88 </section>89 );90}9192export default async function Home({ params }: { params: Promise<{ locale: string }> }) {93 const { locale: raw } = await params;94 const locale: Locale = isLocale(raw) ? raw : "en";95 const t = dict(locale);96 const apps = cards(locale);97 const families = lineup(locale);98 const released = await showcase(locale);99 const downloads = await macDownloads(locale);100 const available = apps.filter((a) => a.status === "available");101 const beta = apps.filter((a) => a.status === "beta");102 const building = apps.filter((a) => a.status === "development" || a.status === "coming-soon");103 const store = families.mobile.filter((a) => a.action.kind === "appstore");104 const news = feed(locale).slice(0, 4);105 // Counted from the catalog and the release record at request time; the last figure is what the content security policy enforces.106 const stats: [number, string][] = [[apps.length, t.stats.apps], [downloads.length, t.stats.available], [store.length, t.stats.store], [0, t.stats.trackers]];107 const icons = apps.map((a) => ({ slug: a.slug, name: a.name, icon: a.icon, accent: a.accent, href: href(locale, `/apps/${a.slug}`) }));108 const [first, second] = t.hero.title;109110 return (111 <>112 <script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(organizationLd(locale)) }} />113 <div className="scroll-progress" aria-hidden />114 <Hero apps={icons}>115 <div className="rise" style={{ "--d": "0.1s" } as React.CSSProperties}>116 {downloads.length > 0117 ? <p><Link href={href(locale, "/downloads")} className="pill" data-testid="hero-pill"><span className="pill-dot" aria-hidden />{t.hero.pill(downloads.length)}<Arrow /></Link></p>118 : <p className="eyebrow">{t.hero.eyebrow}</p>}119 </div>120 <h1 className="display mx-auto mt-7 max-w-[13ch] sm:max-w-none">121 <Words now text={first} className="block" />122 <Words now text={second} className="block pb-[0.08em]" inner="beam-text sheen" start={first.split(" ").length + 1} />123 </h1>124 <p className="lead rise mx-auto mt-7" style={{ "--d": "1.05s" } as React.CSSProperties}>{t.hero.body}</p>125 <div className="rise mt-9 flex flex-wrap items-center justify-center gap-3" style={{ "--d": "1.25s" } as React.CSSProperties}>126 {downloads.length > 0 && <Link href={href(locale, "/downloads")} className="btn btn-primary btn-glow magnetic" data-testid="hero-download"><Down />{t.hero.download}</Link>}127 <Link href={href(locale, "/apps")} className={`btn magnetic ${downloads.length ? "btn-ghost" : "btn-primary"}`}>{t.hero.explore}<Arrow /></Link>128 {downloads.length === 0 && <Link href={href(locale, "/ecosystem")} className="btn btn-ghost">{t.hero.discover}</Link>}129 </div>130 <p className="mono rise mt-10 text-[0.74rem] uppercase tracking-[0.14em] text-ink3" style={{ "--d": "1.45s" } as React.CSSProperties} data-testid="hero-counts">{t.hero.counts(apps.length, available.length, beta.length, building.length)}</p>131 </Hero>132133 <section className="relative z-10 -mt-px" aria-label="ORIX">134 <div className="wrap wrap-wide">135 <Reveal>136 <dl className="stats" data-testid="home-stats">137 {stats.map(([n, l]) => <div key={l}><dd className="mono beam-text"><CountUp value={n} /></dd><dt>{l}</dt></div>)}138 </dl>139 </Reveal>140 </div>141 </section>142143 {released.length > 0 && (144 <section className="pt-[clamp(4.5rem,10vw,9rem)]" aria-labelledby="showcase-title">145 <div className="wrap wrap-wide">146 <Reveal>147 <p className="eyebrow">{t.showcase.eyebrow}</p>148 <h2 id="showcase-title" className="h1 mt-5 max-w-4xl"><Words text={t.showcase.title} /></h2>149 <p className="lead mt-5">{t.showcase.body}</p>150 </Reveal>151 </div>152 <Showcase label={t.showcase.label} items={released.map((a) => ({153 slug: a.slug, name: a.name, tagline: a.tagline, summary: a.summary, icon: a.icon, accent: a.accent, device: a.device, shot: a.shot,154 meta: <><StatusBadge status={a.status} locale={locale} /><PlatformBadges platforms={a.platforms} locale={locale} />{a.version && <span className="tag">v{a.version}</span>}</>,155 actions: <>{a.action.kind !== "details" && <PrimaryAction app={a} locale={locale} />}<Link href={href(locale, `/apps/${a.slug}`)} className="btn btn-ghost">{t.action.learn}<Arrow /></Link></>,156 }))} />157 </section>158 )}159160 <Family id="mac" tone="var(--blue)" eyebrow={t.lineup.mac.eyebrow} ghost={t.lineup.mac.ghost} title={t.lineup.mac.title(families.mac.length)} body={t.lineup.mac.body} apps={families.mac} locale={locale} more={{ href: href(locale, "/downloads"), label: t.home.allDownloads }} />161162 <IconMarquee apps={icons} label={t.lineup.band} />163164 <Family id="mobile" tone="var(--violet)" eyebrow={t.lineup.mobile.eyebrow} ghost={t.lineup.mobile.ghost} title={t.lineup.mobile.title(families.mobile.length)} body={t.lineup.mobile.body} apps={families.mobile} locale={locale} more={{ href: href(locale, "/apps"), label: t.home.allApps }} />165166 <section className="section rule" aria-labelledby="universe-title">167 <div className="wrap wrap-wide">168 <Reveal>169 <p className="eyebrow">{t.universe.eyebrow}</p>170 <h2 id="universe-title" className="h1 mt-5 max-w-3xl"><Words text={t.universe.title} /></h2>171 <p className="lead mt-5">{t.universe.body}</p>172 </Reveal>173 <Reveal className="mt-10" delay={120}>174 <Universe175 apps={apps.map((a) => ({ slug: a.slug, name: a.name, icon: a.icon, accent: a.accent, href: href(locale, `/apps/${a.slug}`), summary: a.summary, status: a.status, platforms: a.platforms }))}176 labels={{ all: t.universe.all, open: t.universe.open, pause: t.universe.pause, play: t.universe.play, hint: t.universe.hint, platforms: t.platforms, status: t.status }} />177 </Reveal>178 </div>179 </section>180181 <div className="band rule" role="group" aria-label={t.band.label}>182 <p className="sr-only">{t.band.label}: {t.band.items.join(", ")}</p>183 <div className="marquee" aria-hidden>184 {[0, 1].map((k) => <ul key={k}>{t.band.items.map((w) => <li key={w}>{w}</li>)}</ul>)}185 </div>186 </div>187188 <section className="section bg-bg2" aria-labelledby="principles-title">189 <div className="wrap wrap-wide">190 <Reveal>191 <p className="eyebrow">{t.principles.eyebrow}</p>192 <h2 id="principles-title" className="h1 mt-5 max-w-4xl"><Words text={t.principles.title} /></h2>193 </Reveal>194 <ol className="mt-14 grid gap-5 md:grid-cols-2">195 {t.principles.items.map(([title, body], i) => (196 <Reveal as="li" key={title} delay={(i % 2) * 110}>197 <div className="card tilt h-full p-7 sm:p-9">198 <span className="mono beam-text text-[0.8rem] font-semibold tracking-[0.16em]">0{i + 1}</span>199 <h3 className="h2 mt-4 !text-[clamp(1.5rem,2.4vw,2rem)]">{title}</h3>200 <p className="mt-3 max-w-xl text-ink2">{body}</p>201 </div>202 </Reveal>203 ))}204 </ol>205 </div>206 </section>207208 {news.length > 0 && (209 <section className="section" aria-labelledby="news-title">210 <div className="wrap">211 <Reveal className="flex flex-wrap items-end justify-between gap-6">212 <h2 id="news-title" className="h2">{t.home.latest}</h2>213 <Link href={href(locale, "/whats-new")} className="link text-[0.95rem] font-semibold">{t.home.allNews}</Link>214 </Reveal>215 <Reveal className="mt-8"><NewsList items={news} locale={locale} /></Reveal>216 </div>217 </section>218 )}219220 <section className="finale rule" aria-labelledby="finale-title">221 <Starfield density={0.7} /><div className="halo halo-sm" aria-hidden><i /><i /></div>222 <Reveal className="wrap relative z-10 text-center">223 <h2 id="finale-title" className="display !text-[clamp(2.3rem,6vw,5rem)]">224 <Words text={t.cta.title[0]} className="block" />225 <Words text={t.cta.title[1]} className="block pb-[0.08em]" inner="beam-text sheen" start={3} />226 </h2>227 <p className="lead mx-auto mt-6">{t.cta.body}</p>228 <div className="mt-9 flex flex-wrap items-center justify-center gap-3">229 {downloads.length > 0 && <Link href={href(locale, "/downloads")} className="btn btn-primary btn-glow magnetic"><Down />{t.hero.download}</Link>}230 <Link href={href(locale, "/apps")} className="btn btn-ghost magnetic">{t.hero.explore}<Arrow /></Link>231 </div>232 </Reveal>233 </section>234 </>235 );236}237